package ddemo.dao;

import ddemo.pojo.Ask;

import java.util.List;

public interface AskMapper {
    @Select("INSERT INTO `ask` (askid,ask_username,ask_phone_number) values(#{askid},#{ask_username},#{ask_phone_number})")
    public  int ask(@Param("askid") Integer askid, @Param("ask_username") String ask_username, @Param("ask_phone_number") String ask_phone_number);

    @Select("SELECT * from `ask`")
    public  List<Ask> getAskid();

    @Select("DELETE FROM `ask` WHERE askid = #{askid}")
    public  int deleteAskid(@Param("askid") Integer askid);

    @Select("UPDATE user SET `power` = #{power} WHERE id = #{id}")
    public int shangpai(@Param("power") Integer power, @Param("id") Integer id);
}
